package com.ruoyi.durian.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券模块-购买套餐记录表
 * @TableName ll_thali_record
 */
@TableName(value ="ll_thali_record")
public class LlThaliRecord implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 套餐名称
     */
    private String thaliName;

    /**
     * 套餐id
     */
    private Integer thaliId;

    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 最高省多少
     */
    private BigDecimal maxMoney;

    /**
     * 套餐价格
     */
    private BigDecimal price;

    /**
     * 优惠券个数
     */
    private Integer couponNum;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 用户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 套餐名称
     */
    public String getThaliName() {
        return thaliName;
    }

    /**
     * 套餐名称
     */
    public void setThaliName(String thaliName) {
        this.thaliName = thaliName;
    }

    /**
     * 套餐id
     */
    public Integer getThaliId() {
        return thaliId;
    }

    /**
     * 套餐id
     */
    public void setThaliId(Integer thaliId) {
        this.thaliId = thaliId;
    }

    /**
     * 下单时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 下单时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 最高省多少
     */
    public BigDecimal getMaxMoney() {
        return maxMoney;
    }

    /**
     * 最高省多少
     */
    public void setMaxMoney(BigDecimal maxMoney) {
        this.maxMoney = maxMoney;
    }

    /**
     * 价格
     */
    public BigDecimal getPirce() {
        return price;
    }

    /**
     * 价格
     */
    public void setPirce(BigDecimal price) {
        this.price = price;
    }

    /**
     * 优惠券个数
     */
    public Integer getCouponNum() {
        return couponNum;
    }

    /**
     * 优惠券个数
     */
    public void setCouponNum(Integer couponNum) {
        this.couponNum = couponNum;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 是否删除
     */
    public Integer getIsDelete() {
        return isDelete;
    }

    /**
     * 是否删除
     */
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LlThaliRecord other = (LlThaliRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getThaliName() == null ? other.getThaliName() == null : this.getThaliName().equals(other.getThaliName()))
            && (this.getThaliId() == null ? other.getThaliId() == null : this.getThaliId().equals(other.getThaliId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getMaxMoney() == null ? other.getMaxMoney() == null : this.getMaxMoney().equals(other.getMaxMoney()))
            && (this.getPirce() == null ? other.getPirce() == null : this.getPirce().equals(other.getPirce()))
            && (this.getCouponNum() == null ? other.getCouponNum() == null : this.getCouponNum().equals(other.getCouponNum()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getThaliName() == null) ? 0 : getThaliName().hashCode());
        result = prime * result + ((getThaliId() == null) ? 0 : getThaliId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getMaxMoney() == null) ? 0 : getMaxMoney().hashCode());
        result = prime * result + ((getPirce() == null) ? 0 : getPirce().hashCode());
        result = prime * result + ((getCouponNum() == null) ? 0 : getCouponNum().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", thaliName=").append(thaliName);
        sb.append(", thaliId=").append(thaliId);
        sb.append(", createTime=").append(createTime);
        sb.append(", maxMoney=").append(maxMoney);
        sb.append(", couponNum=").append(couponNum);
        sb.append(", price=").append(price);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}